var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("GlobalParams"),
    i = e("AssetsManager"),
    r = e("CommonHelper"),
    s = e("RoleSoldierInfo"),
    l = cc._decorator,
    c = l.ccclass,
    d = l.property,
    h = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (
                (t.hero_head = null),
                (t.player_name = null),
                (t.choose_state_node = null),
                (t.hero_type_label = null),
                t
            );
        }
        return (
            __extends(t, e),
            (t.prototype.showChoosePlayerInfo = function (e) {
                var t = this;
                (this.player_name.string = a.GlobalParams.MatchGamePlayer[e].name),
                    (this.choose_state_node.children[0].active = !0),
                    (this.choose_state_node.children[1].active = !1),
                    (this.hero_type_label.string = "*****"),
                    (this.hero_head.spriteFrame = null),
                    (this.player_name.node.color =
                        e != a.GlobalParams.MatchMyIndex ? new cc.Color(255, 255, 255) : new cc.Color(25, 255, 130)),
                    e != a.GlobalParams.MatchMyIndex &&
                        this.scheduleOnce(function () {
                            t.showPlayerInfo(e);
                        }, r.default.getRandom(3, 8));
            }),
            (t.prototype.showPlayerInfo = function (e) {
                var t = s.default.Role_info[a.GlobalParams.MatchGamePlayer[e].role_id];
                (this.hero_head.spriteFrame = i.default.getInstance().getHeroHeadFrame(t.C_ID)),
                    (this.hero_type_label.string = "[" + (0 == t.C_type ? "近战英雄" : "远程英雄") + "]"),
                    (this.choose_state_node.children[0].active = !1),
                    (this.choose_state_node.children[1].active = !0);
            }),
            __decorate([d(cc.Sprite)], t.prototype, "hero_head", void 0),
            __decorate([d(cc.Label)], t.prototype, "player_name", void 0),
            __decorate([d(cc.Node)], t.prototype, "choose_state_node", void 0),
            __decorate([d(cc.Label)], t.prototype, "hero_type_label", void 0),
            __decorate([c], t)
        );
    })(n.default);
o.default = h;
